<?php

namespace App\Helpers;

class ValidatorTool
{

    /**
     * 判断是否为手机号码。
     *
     * @param string $mobilePhone
     * @return bool
     */
    public static function is_mobilePhone(string $mobilePhone): bool
    {
        return (bool)preg_match('/^13[\d]{9}$|^14[0-9]\d{8}$|^15[0-9]\d{8}$|^16[0-9]\d{8}$|^17[0-9]\d{8}$|^18[0-9]\d{8}$|^19[0-9]\d{8}$/', $mobilePhone);
    }
}
